import type { MockConfig, MockMethod } from "vite-plugin-mock";
import type { optResp } from "../src/types";
import Mock, { MockjsRequestOptions } from "mockjs";
import baseResponse from "./base";
import Lyric from './lyric-data';



export default (config?: MockConfig) => {
  return [
    {
      url: "/api/getLyric",
      method: "get",
      response: ({ body, query }: optResp) => {
        //const lyric = Lyric.find((item) => item.id === query.mid);
        const lyric = Lyric[0];
        return baseResponse.success(lyric);
      }
    }
  ] as MockMethod[];
}